package com.ftg.learn.chapter09.say;

import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * A类
 *
 * @author kangjx
 * @version 1.0
 * @date 2023/8/14 下午3:13
 */
@Data
public class A {

    public A(){
        blist = new ArrayList<>();
    }

    private String color;

    private B[] bs;

    //jvm 为您分配的一个默认値
    private List<B> blist;


    public List<B> getBlist(){
        if(null == blist){
            blist = new ArrayList<>();
        }
        return this.blist;
    }


}
